home *** CD-ROM | disk | FTP | other *** search
- /*
- * The original copyright owners of the accompanying source code files have
- * agreed to place such code into the public domain. Accordingly, anyone
- * who receives or obtains a copy of such source code is freely entitled to
- * reproduce, use and otherwise exploit such code (including the right to
- * make derivative works), at his/her own risk and expense, without any
- * obligation or liability to the original copyright owners.
- *
- * We would appreciate (but do not require) that the following message be
- * included in any derivative works:
- *
- * "Portions of this program were developed by Peter Broadwell, Rob Myers
- * and Robin Schaufler while working in Silicon Valley."
- *
- * The accompanying source code files and related documentation materials
- * are distributed on an "AS IS" basis, without any warranties or
- * guarantees of any kind. All implied warranties, including the implied
- * warranties of merchantability and of fitness for any particular purpose,
- * are expressly disclaimed.
- */
- #include "gl.h"
- #include "geom.h"
- #include "class.h"
- #include "classIds.h"
- #include "selectors.h"
- #include "mbox.h"
- #include "panel.h"
- #include "colors.h"
-
- extern class instClass;
-
- extern char *initPanel(), *drawPanel(), *freePanel();
- extern char *selectPanel(), *deselectPanel();
- extern char *bselPanel(), *cselPanel();
- extern char *eselPanel(), *oselPanel(), *nselPanel(), *kselPanel();
-
- fcnTable panelTable[] = {
- INIT, initPanel, /* initialize the control panel */
- DRAW, drawPanel, /* render the panel description */
- FREE, freePanel, /* gffree panel & his pals */
- SELECT, selectPanel, /* process a selection on a panel */
- DESELECT, deselectPanel, /* process a deselection on a panel */
- BEGINSELECT,bselPanel, /* begin picking on a panel */
- CONTSELECT, cselPanel, /* continue picking on a panel */
- ENDSELECT, eselPanel, /* end picking on a panel */
- OLDSELECT, oselPanel, /* no longer picking on a panel */
- NEWSELECT, nselPanel, /* continue picking on a new panel */
- KILLSELECT, kselPanel, /* abort picking on current panel */
- RESET, NULL, /* opportunity to reset panel */
- DRAWTRACKER,NULL,
- EOTABLE,
- };
-
- class panelClass = {
- &instClass,
- panelTable,
- sizeof(panel),
- PANEL,
- };
-
- panel panelTemplate = {
- /* inst */
- &panelClass, /* myClass pointer */
- NULL, /* classFunctions */
- 0, /* nFunctions */
- /* mailbox */
- NULL, /* subscribers */
- NULL, /* subscribedTo */
- /* panel */
- NULL, /* next */
- NULL, /* kids */
- NULL, /* dad */
- 0,0,0,0, /* area */
- NULL, /* painter */
- };
-
-
- fcnTable colorPanelTable[] = {
- EOTABLE,
- };
-
- class colorPanelClass = {
- &panelClass,
- colorPanelTable,
- sizeof(colorPanel),
- COLORPANEL,
- };
-
- colorPanel colorPanelTemplate = {
- /* inst */
- &colorPanelClass, /* myClass pointer */
- NULL, /* classFunctions */
- 0, /* nFunctions */
- /* mailbox */
- NULL, /* subscribers */
- NULL, /* subscribedTo */
- /* panel */
- NULL, /* next */
- NULL, /* kids */
- NULL, /* dad */
- 0,0,0,0, /* area */
- NULL, /* painter */
- };
-
- masterPanel mPanelTemplate = {
- /* inst */
- &panelClass, /* myClass pointer */
- NULL, /* classFunctions */
- 0, /* nFunctions */
- /* mailbox */
- NULL, /* subscribers */
- NULL, /* subscribedTo */
- /* panel */
- NULL, /* next */
- NULL, /* kids */
- NULL, /* dad */
- 0,0,256,767, /* area */
- NULL, /* painter */
- /* masterPanel */
- 0,0, /* highwater */
- };
-